﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Foreach
{
    class Program
    {
        static void Main(string[] args)
        {
            string s;
            int a = 0, b = 0;
            Console.WriteLine("请输入第一个字符串");
            s = Console.ReadLine();
            foreach (char c in s)
            {
                if (c >= 'A' && c <= 'Z')
                {
                    a++;
                }
                else if (c >='a'&&c <='z')
                {
                    b++;
                }
                else
                {
                    continue;
                }
                

            }
            Console.WriteLine($"大写字母有{a}个，小写字母有{b }个");
            Console.ReadKey();

        }
    }
}
